package com.xqdok.wdj.adapter;

import java.util.ArrayList;
import java.util.List;

import com.liran.yunzhuan.R;
import com.xqdok.wdj.model.GameModel;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;

public class ListAdapter extends BaseAdapter {
	List lists;
	Context context;

	public ListAdapter(Context context, List lists) {
		this.lists = lists;
		this.context = context;
	}

	public int getCount() {
		// TODO Auto-generated method stub
		return lists.size();
	}

	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return lists.get(position);
	}

	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	public View getView(int position, View v, ViewGroup parent) {
		// TODO Auto-generated method stub
		if (v == null) {
			v = LayoutInflater.from(context).inflate(R.layout.item_list, null);
		}
		return v;
	}

}
